package utils

import (
	"fmt"

	"github.com/beego/beego/v2/server/web"
)

func CheckRequestParams(controller *web.Controller, params ...string) error {
	for _, param := range params {
		check := controller.GetString(param)
		if len(check) == 0 || check == "" {
			return fmt.Errorf("%s", param)
		}
	}
	return nil
}
